<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 
<ui:composition xmlns="http://www.w3.org/1999/xhtml"    
xmlns:h="http://java.sun.com/jsf/html"    
xmlns:f="http://java.sun.com/jsf/core"    
xmlns:ui="http://java.sun.com/jsf/facelets"    
xmlns:a4j="http://richfaces.org/a4j"    
xmlns:rich="http://richfaces.org/rich"> 

<!--@ page import="javax.faces.context.* "%>
<%@ page import="operatore.bean.*"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" -->

<!--@ taglib uri="http://java.sun.com/jsf/facelets" prefix="ui" -->
<head>
	<META http-equiv="Content-Style-Type" content="text/css" />
	<META http-equiv="Content-Script-Type" content="text/javascript" />
	<META http-equiv="Cache-Control" content="no-cache" />
	<META http-equiv="Pragma" content="no-cache" />
	<META http-equiv="expires" content="-1" />
	<META http-equiv="Content-Type" content="text/html; charset=UTF-8" />
	<title>RichFaces Greeter</title>
	<script type="text/javascript">
function resize_iframe() {
	var bb,aa;
	
   	if(document.layers) {
    	bb = window.Width;
      	aa = window.Height;
   	} else if(document.all) {
       	bb = document.body.offsetWidth;
       	aa = document.body.offsetHeight;
    }
   	var urlFrame = document.getElementById("urlFrame");
   	urlFrame.style.height = aa - 220 + 'px';
   	urlFrame.style.width = bb - 45 + 'px';
   	var filtriDiRicerca = document.getElementById("filtriDiRicerca");
   	filtriDiRicerca.style.width = bb - 45 + 'px';
   	filtriDiRicerca.style.height = '220px';
}
top.window.onresize = function() { resize_iframe(); };


function customFilter(subString, value){
   if(subString.length>=1) {
      if(value.indexOf(subString)!=-1) 
         return true;
   }else return false;
};


</script>
	
</head>
<body>
<f:view>
	<f:loadBundle basename="properties.base" var="bundle" />
	<h:form>
		<rich:panel header="#{bundle['Index.oddBox.label']}" id="filtriDiRicerca" >
			<h:outputText value="#{bundle['Index.sitoDaRicercare.label']}" />
			<rich:autocomplete value="#{sitoMB.sitoFrame}" mode="ajax" minChars="0" autofill="false"
                      clientFilter="customFilter" autocompleteMethod="#{sitoMB.autocomplete}" />
  			<h:commandLink action="#{sitoMB.buttonProponiSito}" type="_self">
  				<f:param value="inserisciSitoIntoDataBase" name="param1" />
				<h:graphicImage url="/Images/exit.png" />
				<h:outputText value="#{bundle['Index.aggiungiSito.label']}"
					title="#{bundle['Index.aggiungiSito.title']}" />
			</h:commandLink>
  
  			<h:commandLink action="#{sitoMB.buttonProponiSito}" type="_self">
				<f:param value="ricercaSitoIntoDataBase" name="param1" />
				<h:graphicImage url="/Images/exit.png" />
				<h:outputText value="#{bundle['Index.buttonRicerca.label']}"
					title="#{bundle['Index.buttonRicerca.title']}" />
			</h:commandLink>
			
			<h:commandLink action="#{sitoMB.buttonProponiSito}" type="_self">
				<f:param value="ricercaImmagineIntoDataBase" name="param1" />
				<h:graphicImage url="/Images/exit.png" />
				<h:outputText value="#{bundle['Index.buttonRicercaImageInDB.label']}"
					title="#{bundle['Index.buttonRicercaImageInDB.title']}" />
			</h:commandLink>
			
			<h:commandLink action="#{sitoMB.buttonProponiSito}" type="_self">
				<f:param value="sistemazioneImmaginiDaArchivioSito" name="param1" />
				<h:graphicImage url="/Images/exit.png" />
				<h:outputText value="#{bundle['Index.buttonSistemaImageInDB.label']}"
					title="#{bundle['Index.buttonSistemaImageInDB.title']}" />
			</h:commandLink>
			
			
			
			
			
			
			
			<h:commandLink action="#{sitoMB.buttonProponiSito}" target="_self">
				<f:param value="image" name="param1" />
				<h:graphicImage url="/Images/exit.png" />
				<h:outputText value="#{bundle['Index.ricercaImmagini.label']}"
					title="#{bundle['Index.ricercaImmagini.title']}" />
			</h:commandLink>

			<h:commandLink action="#{sitoMB.buttonProponiSito}" target="_self"  >
				<f:param value="link" name="param1" />
				<!-- <a4j:support event="onclick" reRender="frameCentrale" /> -->
				<h:graphicImage url="/Images/exit.png" />
				<h:outputText value="#{bundle['Index.ricercaLink.label']}"
					title="#{bundle['Index.ricercaLink.title']}" />
			</h:commandLink>
			
			<h:commandLink action="#{sitoMB.buttonProponiSito}" target="_self"  >
				<f:param value="div" name="param1" />
				<h:graphicImage url="/Images/exit.png" />
				<h:outputText value="#{bundle['Index.ricercaDiv.label']}"
					title="#{bundle['Index.ricercaDiv.title']}" />
			</h:commandLink>
			
			<h:commandLink action="#{sitoMB.buttonProponiSito}" target="_self"  >
				<f:param value="esploraSito" name="param1" />
				<h:graphicImage url="/Images/exit.png" />
				<h:outputText value="#{bundle['Index.esploraSito.label']}"
					title="#{bundle['Index.esploraSito.title']}" />
			</h:commandLink>
			<h:commandLink action="#{sitoMB.buttonProponiSito}" target="_self"  >
				<f:param value="esploraSitoConThread" name="param1" />
				<h:graphicImage url="/Images/exit.png" />
				<h:outputText value="#{bundle['Index.esploraSitoConThread.label']}"
					title="#{bundle['Index.esploraSitoConThread.title']}" />
			</h:commandLink>
			<h:commandLink action="#{sitoMB.buttonProponiSito}" target="_self"  >
				<f:param value="esploraSitoSalvaImmaginiElink" name="param1" />
				<h:graphicImage url="/Images/exit.png" />
				<h:outputText value="#{bundle['Index.esploraSitoSalvaImmaginiElink.label']}"
					title="#{bundle['Index.esploraSitoSalvaImmaginiElink.title']}" />
			</h:commandLink>
			
			<!--
                              <a4j:commandButton value="Get greeting" reRender="greeting" />
                              
                              <h:panelGroup id="greeting" >
                                    <h:outputText value="Hello, " rendered="#{not empty user.name}" />
                                    <h:outputText value="#{user.name}" />
                                    <h:outputText value="!" rendered="#{not empty user.name}" />
                              </h:panelGroup>
                              -->
		</rich:panel>
		
		<rich:panel id="flash" >
			<object type="application/x-shockwave-flash" data="http://html.it/guide/esempi/guida_html/multimedia/flash/bottone_in-out.swf" width="450" height="164">
				<param name="movie" value="http://html.it/guide/esempi/guida_html/multimedia/flash/bottone_in-out.swf"/>
			</object>
		</rich:panel> 
		<rich:panel id="flashMio" >
			<object type="application/x-shockwave-flash" data="\\Progetti\Flash\Senza nome-1.swf" width="450" height="164">
				<param name="movie" value="\\Progetti\Flash\Senza nome-1.swf"/>
			</object>
		</rich:panel>
		
		
		<rich:panel id="frameCentrale" header="#{bundle['Index.sitoDaRicercare.label']}">
			<iframe src="${sitoMB.urlFrame}" id="urlFrame" name="center" frameborder="1" style="padding: 0px" > </iframe>
			<script type="text/javascript">
		      resize_iframe();
		    </script>
		</rich:panel>
	</h:form>
</f:view>
</body>
</ui:composition>